# 怎样实现对列表去重

def add_unique_elements(list1, list2):
    for i in list1:
        if i not in list2:
            list2.append(i)
    return list2


list1 = [2, 3, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 6, 7, 8, 9]
list2 = []
print(add_unique_elements(list1, list2))


####  又一种
yuan_list = [2, 3, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 6, 7, 8, 9]

final_list = set(yuan_list)
print(list(final_list))
